package com.ashley.day_0405;

public class PrintSumTest {

	public static void main(String[] args) {
		int sum = 0;
		int count = 0;
		for (int i = 1; i <= 100; i++) {
			if (i % 2 != 0) {
				sum += i;
				count++;
				System.out.println(i);
			}
		}
		System.out.println("100以内所有奇数的个数为:" + count);
		System.out.println("100以内所有奇数的和为:" + sum);
	}

}
